import $http from '@/assets/js/http'


//查询广告图列表
export function getAdsList(type, id,index, size) {
    return $http.get('/manage/bannerad/ad/list', {
        params: { positionType:type, cityId:id, pageIndex: index, pageSize: size }
    });
}

//删除广告图
export function postDeleteAds(delId) {
    return $http.post('/manage/bannerad/ad/delete', {
        id: delId
    });
}

//新增广告图
export function postAddAds(param) {
    return $http.post('/manage/bannerad/ad/add', {
        positionType:param.positionType,
        cityId:param.cityId,
        img:param.img,
    });
}

//编辑广告图
export function postEditAds(param) {
    return $http.post('/manage/bannerad/ad/edit', {
        id:param.id,
        positionType:param.positionType,
        cityId:param.cityId,
        img:param.img,
    });
}